package com.hrvsr.common.redis;

import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;

public abstract class AbstractRedisQueue {
	private JedisPool jedisPool;
	private int dbNo;
	private String queue;

	public JedisPool getJedisPool() {
		return jedisPool;
	}

	public void setJedisPool(JedisPool jedisPool) {
		this.jedisPool = jedisPool;
	}

	public int getDbNo() {
		return dbNo;
	}

	public void setDbNo(int dbNo) {
		this.dbNo = dbNo;
	}

	public String getQueue() {
		return queue;
	}

	public void setQueue(String queue) {
		this.queue = queue;
	}

	public Jedis genJedis() {
		Jedis jedis = jedisPool.getResource();
		jedis.select(dbNo);
		return jedis;
	}
}
